<?php
header('Content-Type:application/json');
$conn= mysqli_connect('127.0.0.1','root','123456','flower','3306');
mysqli_query($conn,'SET NAMES  UTF8');
$search = $_GET['keyword'];
$sql = "SELECT  * FROM  flowers where category='$search'";
$result = mysqli_query($conn,$sql);
$data = [];
while ($row = mysqli_fetch_array($result)) {
		array_push($data, $row);
	}
echo(json_encode($data));
mysqli_close($conn) ;
 ?>